#ifndef CUSTOMERPAGE_H
#define CUSTOMERPAGE_H

#include <QtGui/QWidget>
#include <QSortFilterProxyModel>
#include <QRegExp>
#include "ui_customerpage.h"

class MySortFilterProxyModel : public QSortFilterProxyModel
 {
     Q_OBJECT
private:
	QChar letter;
 public:
	 MySortFilterProxyModel(QObject *parent = 0);
	 void setLetter(QString);
 protected:
     bool filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const;     
 };

class CustomerPage : public QWidget
{
    Q_OBJECT

public:
    CustomerPage(QWidget *parent = 0);
    ~CustomerPage();

public slots:
    void CloseCustomer();
    void NewCustomer();
    void Update();
    bool SaveCustomer();
    bool CustomerToTrash();    
    bool OpenCustomer(QModelIndex);
    bool SelLetter(QModelIndex);

public:
	MySortFilterProxyModel *proxyModel;
    Ui::CustomerPageClass ui;
};

#endif
